<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" value="{:url('facrm/apps.email/send')}" id="location_url">
    <input id="c-record_type"  type="hidden" class="form-control" name="row[record_type]"
           value="{$row?$row.values.record_type:'0'}"/>
    <div class=" form-group">
        <label for="c-email_id" class="control-label col-xs-12 col-sm-2">{:__('选择邮件模板')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-email_id" data-source="facrm/apps/email/selectpage"
                   data-field="describe" class="form-control selectpage" name="row[email_id]" type="text" value="{$row?$row.id:''}"
                   placeholder="选择" data-format-item="{describe} - {id}">
            <span class="help-block">*请选择邮件模板</span>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('目标邮箱')}:</label>
        <div class="col-xs-12 col-sm-8">
            {php}
            $email=($types_data&&isset($types_data['email']))?$types_data['email']:'';
            {/php}
            <input id="c-email" data-rule="required" type="text" class="form-control" name="row[email]"
                   value="{$email}"/>
            <span class="text-gray">*</span>
        </div>
    </div>



    <div class=" form-group">
        <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('邮件标题')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" type="text" class="form-control" name="row[title]"
                   value="{$row?$row.describe:''}"/>
            <span class="text-gray">*</span>
        </div>
    </div>

    <div class=" form-group">
        <label for="c-content" class="control-label col-xs-12 col-sm-2">{:__('邮件内容')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" data-rule="required" class="form-control editor" name="row[content]">{$row?$row.values.content:''}</textarea>
            <span class="text-gray">*支持自定义变量，如客户名称：{literal}{:name}{/literal}</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed">{:__('submit')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>







